package cn.piesat.scanning.dto;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * 调度任务信息实体类
 * @author xhl
 */
@Entity
@Table(name="db_dms_scheduler_task_info")
public class HtScheduleJobDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 正在执行状态常量
     */
    public static final String STATUS_RUNNING = "1";  //正在运行

    /**
     * 停止执行状态常量
     */
    public static final String STATUS_NOT_RUNNING = "0"; // 已停止

    /**
     * ID
     */
    @Id
    @Column(name = "ID")
    private String id;

    /**
     * 创建时间
     */
    @Column(name = "CREATE_TIME")
    private Timestamp createTime;

    /**
     * 修改时间
     */
    @Column(name = "UPDATE_TIME")
    private Timestamp updateTime;

    /**
     * 任务名称
     */
    @Column(name = "JOB_NAME")
    private String jobName;

    /**
     * 任务组
     */
    @Column(name = "JOB_GROUP")
    private String jobGroup;

    /**
     * 任务状态 是否启动任务
     */
    @Column(name = "JOB_STATUS")
    private String jobStatus;

    /**
     * cron表达式
     */
    @Column(name = "CRON_EXPRESSION")
    private String cronExpression;

    /**
     * cron表达式中文表达
     */
    @Column(name = "CRON_EXPRESSION_NAME")
    private String cronExpressionName;

    /**
     * 描述
     */
    @Column(name = "DESCRIPTION")
    private String description;

    /**
     * 任务执行时调用哪个类的方法 ,包名+类名
     */
    @Column(name = "JOB_CLASSNAME")
    private String jobClassName;

    /**
     * 任务是否有状态
     */
    @Column(name = "IS_CONCURRENT")
    private String isConcurrent;

    /**
     * 下次执行时间
     */
    @Column(name = "NEXT_FIRE_TIME")
    private String nextFireTime;
    /**
     * 上次执行时间
     */
    @Column(name = "PREV_FIRE_TIME")
    private String prevFireTime;

    /**
     * 任务调用的方法名
     */
    @Column(name = "METHOD_NAME")
    private String methodName;

    /**
     * 根据时间类型选择cron 还是simple
     */
    @Column(name = "TIME_TYPE")
    private Integer timeType;

    /**
     * 算法Id
     */
    @Column(name = "ALGO_ID")
    private String algoId;
    /**
     * 算法分类
     */
    @Column(name = "ALGO_CLASSIFY")
    private String algoClassify;
    /**
     * 优先级
     */
    @Column(name = "PRIORITY")
    private Integer priority;
    /**
     * 异常处理类型
     */
    @Column(name = "EXCEPTION_HANDLING")
    private String exceptionHandling;
    /**
     * 异常处理参数
     */
    @Column(name = "HANDLE_PARAMETER")
    private String handleParam;
    /**
     * 任务调度策略
     */
    @Column(name = "SCHEDULE_STRATEGY")
    private String scheduleStrategy;

    /**
     * 任务配置路径ID
     */
    @Column(name = "PATH_CONFIG_ID")
    private String pathConfigId;

    /**
     * 卫星
     */
    @Column(name = "SATELLITE")
    private String satellite;

    /**
     * 流程ID
     */
    @Column(name = "FLOW_ID")
    private String flowId;

    /**
     * 任务类别
     */
    @Column(name = "TASK_TYPE")
    private String taskType;

    /**
     * 重做开始时间
     */
    @Column(name = "REDO_START_TIME")
    private Date redoStartTime;

    /**
     * 重做结束时间
     */
    @Column(name = "REDO_END_TIME")
    private Date redoEndTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobGroup() {
        return jobGroup;
    }

    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }

    public String getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(String jobStatus) {
        this.jobStatus = jobStatus;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public String getCronExpressionName() {
        return cronExpressionName;
    }

    public void setCronExpressionName(String cronExpressionName) {
        this.cronExpressionName = cronExpressionName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getJobClassName() {
        return jobClassName;
    }

    public void setJobClassName(String jobClassName) {
        this.jobClassName = jobClassName;
    }

    public String getIsConcurrent() {
        return isConcurrent;
    }

    public void setIsConcurrent(String isConcurrent) {
        this.isConcurrent = isConcurrent;
    }

    public String getNextFireTime() {
        return nextFireTime;
    }

    public void setNextFireTime(String nextFireTime) {
        this.nextFireTime = nextFireTime;
    }

    public String getPrevFireTime() {
        return prevFireTime;
    }

    public void setPrevFireTime(String prevFireTime) {
        this.prevFireTime = prevFireTime;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Integer getTimeType() {
        return timeType;
    }

    public void setTimeType(Integer timeType) {
        this.timeType = timeType;
    }

    public String getAlgoId() {
        return algoId;
    }

    public void setAlgoId(String algoId) {
        this.algoId = algoId;
    }

    public String getAlgoClassify() {
        return algoClassify;
    }

    public void setAlgoClassify(String algoClassify) {
        this.algoClassify = algoClassify;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public String getExceptionHandling() {
        return exceptionHandling;
    }

    public void setExceptionHandling(String exceptionHandling) {
        this.exceptionHandling = exceptionHandling;
    }

    public String getHandleParam() {
        return handleParam;
    }

    public void setHandleParam(String handleParam) {
        this.handleParam = handleParam;
    }

    public String getScheduleStrategy() {
        return scheduleStrategy;
    }

    public void setScheduleStrategy(String scheduleStrategy) {
        this.scheduleStrategy = scheduleStrategy;
    }

    public String getPathConfigId() {
        return pathConfigId;
    }

    public void setPathConfigId(String pathConfigId) {
        this.pathConfigId = pathConfigId;
    }

    public String getSatellite() {
        return satellite;
    }

    public void setSatellite(String satellite) {
        this.satellite = satellite;
    }

    public String getFlowId() {
        return flowId;
    }

    public void setFlowId(String flowId) {
        this.flowId = flowId;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public Date getRedoStartTime() {
        return redoStartTime;
    }

    public void setRedoStartTime(Date redoStartTime) {
        this.redoStartTime = redoStartTime;
    }

    public Date getRedoEndTime() {
        return redoEndTime;
    }

    public void setRedoEndTime(Date redoEndTime) {
        this.redoEndTime = redoEndTime;
    }
}
